package exp;

public class Cylinder {
    Circle bottom;
    double height;
    public Cylinder() {

    }
    public Cylinder(Circle bottom,double height) {
        this.bottom = bottom;
        this.height = height;
    }
    public Circle getBottom() {
        return bottom;
    }
    public void setBottom(Circle bottom) {
        this.bottom = bottom;
    }
    public double getHeight(double height) {
        return height;
    }
    public void setHeight() {
        this.height = height;
    }
    public double getVolume() {
        return bottom.Area()*height;
    }
    @Override
    public String toString() {
        return "圆柱体的底面积为 "+bottom.Area()+"\n"+"圆柱体的高为"+height+"\n"+"圆柱体的面积为"+(int)getVolume();
    }
}
